package org.jetlinks.community.device.service;


import org.jetlinks.community.device.entity.PlayBackStreamParam;
import org.jetlinks.community.device.entity.PresetView;
import org.jetlinks.community.device.entity.VideoScreen;
import org.jetlinks.community.device.entity.LiveStreamParam;
import org.jetlinks.community.device.enums.CommandHiKEnum;
import reactor.core.publisher.Mono;

import java.util.List;

/**
 * @Author LiHongHui
 * @Date 2021/10/19 11:32
 * @Version 1.0
 */
public interface VideoPlayService {

    /**
     * 获取直播流
     * @param liveStreamParam
     * @return
     */
    Mono<VideoScreen> getLiveStream(LiveStreamParam liveStreamParam);

    /**
     * 获取回放流
     * @param playBackStreamParam
     * @return
     */
    Mono<VideoScreen> getPlayBackStream(PlayBackStreamParam playBackStreamParam);

    /**
     * 开始控制云台
     * @param moId
     * @param direction
     * @return
     */
    Mono<Void> ptz(String moId, CommandHiKEnum direction);

    /**
     * 获取预置点列表
     * @param moId
     * @return
     */
    Mono<List<PresetView>> getPresets(String moId);

    /**
     * 新增预置点
     * @param presetView
     * @return
     */
    Mono<PresetView> addPreset(PresetView presetView);

    /**
     * 执行预置点
     * @param moId
     * @param preset
     * @return
     */
    Mono<Void> invokePreset(String moId, Integer preset);

    /**
     * 删除预置点
     * @param moId
     * @param preset
     * @return
     */
    Mono<Integer> deletePreset(String moId, Integer preset);

    /**
     * 获取视频地址列表
     * @param projectId
     * @param page
     * @param pageSize
     * @return
     */
    Mono<Void> videoScreen(String projectId, Integer page, Integer pageSize);
}
